<template>
	<view>
		<view id="renderModal" :info="info" :change:info="renderModal.receiveInfo">
			555
		</view>
		<view @click="renderModal.changeText">
			确定
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// 用于桥接的数据
				info: '一开始的消息',
			}
		},
		mounted() {
			setTimeout(() => {
				this.info = '变化的消息';
			}, 1000);
		},
		methods: {
			receiveRenderData(val) {
				console.log('val', val)
			}
		}
	}
</script>


<script module="renderModal" lang="renderjs">
	export default {
		data() {
			return {
				ower: '',
			}
		},
		methods: {
			changeText(event, ower) {
				this.ower = ower;
				let mainView = document.getElementById("renderModal");
				mainView.innerText = "xxxdddxxx";
				this.$ownerInstance.callMethod("receiveRenderData", "666")
			},
			receiveInfo(newValue, oldValue, ownerVm, vm) {
				console.log(newValue, oldValue)
			}
		}
	}
</script>

<style>

</style>